This invention relates to a method and an apparatus for controlling a servomotor for driving a CNC machine tool, etc.
In a CNC machine tool, usually a servomotor rotates a ball screw for driving, thereby moving a table with a workpiece fixed. Thus, for example, to execute circular cutting, as well known, there is a problem of degrading work accuracy as the table move direction is not instantaneously switched due to backlash of the ball screw, the friction of each part of a machine, etc., and a projection called quadrantal projection occurs in the vicinity of the quadrant boundary on the cut face of the workpiece.
FIG. 9 is a block diagram of a servo control apparatus in a related art intended for preventing such a quadrantal projection from occurring, etc. In FIG. 9, numeral 1 denotes a position command generation section, numeral 2 denotes a position control section, numeral 3 denotes a speed control section, numeral 4 denotes a current control section, numeral 5 denotes a power amplification circuit, numeral 6 denotes a servomotor for driving a machine system 16, numeral 7 decodes an encoder or detecting the rotation position of the servomotor 6, and numeral 8 denotes differentiating means for differentiating a position detection signal 10 output by the encoder 7 to calculate speed. The encoder 7 and the differentiating means 8 make up motor speed detection means. Numeral 9 denotes a position command output from the position command generation section 1, numeral 10 denotes position feedback of the position detection signal output from the encoder 7, numeral 11 denotes a speed command output from the position control section 2, numeral 12 denotes speed feedback of a speed detection signal output from the differentiating means 8, numeral 13 denotes a speed deviation signal of the difference between the speed command 11 and the speed feedback 12, numeral 14 denotes a current command output from the speed control section 3, numeral 15 denotes a current feedback signal indicating a current flowing into the servomotor 6, numeral 16 denotes the machine system of a CNC machine tool, etc., driven by the servomotor 6, numeral 17 denotes load torque produced by the reaction force applied from the machine system 16 to the servomotor 6 or friction, numeral 18 denotes a speed proportional control section in the speed control section 3, numeral 19 denotes a speed integration control section in the speed control section 3, numeral 20 denotes a proportional term command output by the speed proportional control section 18, and numeral 21 denotes an integration term command output by the speed integration control section 19, the integration term command being added to the proportional term command 20 to generate the current command 14.
Numeral 22 denotes a correction signal generation section for suppressing an error relative to the command position occurring when the direction of the servomotor 6 or the machine is reversed by the effect of friction, etc., and preventing a quadrantal projection from occurring, etc., when circular cutting is executed, and numeral 23 denotes a current command correction signal (correction value) output by the correction signal generation section 22.
In the apparatus in the related art, the correction value 23 corresponding to the frictional amount is added when the direction of the servomotor 6 is reversed, and as the correction amount, the value preset as a parameter is used or the optimum value for each condition of the feed rate and acceleration stored in memory is used. The correction amount is added as a time function or a travel distance or feed rate function in some cases.
However, in the servo control apparatus in the related art, as the above-mentioned correction amount, the optimum value under a predetermined condition needs to be previously determined at the machine adjusting time, and the frictional amount, etc., of the error cause at the direction reversing time changes largely due to a secular variation and the difference in the condition of the machine position, etc., and it is difficult to determine the optimum correction amount.
Even if the correction amount is determined, the optimum effect becomes hard to provide with the passage of time; this is a problem.
Further, in the machine system with large elastic change in torsion of the ball screw, a seal material (being provided slidably in the surrounding of the shaft of the servomotor, etc., so as to prevent oil, etc., from entering the servomotor side, the outer peripheral part of the seal material being fixed to base section), etc., a correction can be made to an error caused by a follow-up delay (quadrantal projection) occurring at the direction reversing time, but undercut caused by later torsion restoration, etc., cannot be suppressed. FIGS. 10A and 10B show simulation of behavior at the direction reversing time before correction in a machine system with large elastic change in torsion of a ball screw, a seal material, etc.; FIG. 10A shows roundness accuracy and FIG. 10B shows speed and current waveform at the direction reversing time. The result of making correction in the related art shown in FIG. 9 in such a machine system is shown in FIGS. 11A and 11B. In FIGS. 11A and 11B, FIG. 11A shows roundness accuracy and FIG. 11B shows speed and current waveform at the direction reversing time.
In the correction in the related art, the correction value corresponding to the frictional amount is added at the direction reversing time in such a manner that the correction amount is gradually increased in response to the distance from the direction reversing. To apply to a system having elasticity of torsion, etc., in machine system, the correction value may result in over correction instantaneously as shown in FIGS. 11A and 11B and even in such a case, means for changing the correction value does not exist and thus undercut occurs.
An apparatus shown in FIG. 12 exits as a servo control apparatus in another related art.
Shown in FIG. 12 is the invention disclosed in JP-A-1-276315. In the figure, Xc denotes a position command, numeral 101 denotes a subtracter for comparing the position command Xc with an output signal X of a position detector 106 for performing subtraction and outputting deviation E, numeral 102 denotes an amplifier for amplifying the deviation E and outputting a speed command V, numeral 103 denotes a speed controller for controlling drive output to a servomotor 104 in response to the input speed command V, numeral 105 denotes a working machine wherein, for example, a working tool is moved or a working table on which a workpiece is placed is moved by drive of the servomotor 104, numeral 106 denotes a position detector for detecting the position of the above-mentioned mobile unit in the working machine 105, and numeral 107 denotes an ideal position calculator. This ideal position calculator 107 is made up of a subtracter 108 for outputting deviation Ei between the position command Xc and an ideal position Xi, an amplifier 109 for amplifying the deviation Ei and outputting a speed signal Vi, and an integrator 110 for performing time quadrature of the speed signal Vi (speed command) and outputting an ideal position signal Xi corresponding to the ideal position.
Numeral 111 denotes a subtracter for outputting the deviation between the deviation Ei and the deviation E, numeral 112 denotes an amplifier for multiplying the deviation output by he subtracter 111 by a correction gain, and numeral 113 denotes an adder for adding the deviation multiplied by the correction gain to the speed command V.
The servo control apparatus adds the result of multiplying the error between the ideal position and the actual position by the gain and amplifying the multiplication result to the speed command V so as to decrease the speed command V when the position detected by the position detector 106 is ahead of the ideal position and increase the speed command V when the position is behind the ideal position.
However, the apparatus shown in FIG. 12 always amplifies the error between the ideal position and the actual position for making a correction as well as at the direction reversing time and thus involves problems of easily inducing machine resonance and vibration and being unstable and if the gain is set attaching importance to safety, being incapable of sufficiently suppressing the error caused by a follow-up delay occurring at the direction reversing time. FIGS. 13A to 13C show simulation of behavior when correction in the invention disclosed in JP-A-1-276315 is made to the machine system with large elastic change in torsion of a ball screw, a seal material, etc., shown in FIGS. 11A and 11B; FIG. 13A shows roundness accuracy and FIG. 13B shows speed and current waveform at the direction reversing time. Machine vibration is easily induced and the position, the speed, and the current waveform are like vibration and quadrantal projections in the roundness accuracy are also left comparatively large.
The invention is intended for solving the problems as described above and it is an object of the invention to provide a servo control method and its apparatus capable of suppressing variations in the correction effect, caused by the effect of a secular variation of the friction amount and the work condition difference and even in a machine system with large elastic change in torsion of a ball screw, a seal material, etc., suppressing undercut caused by torsion restoration after the correction, etc., and moreover preventing a servo system from becoming unstable as the correction is made.
Then, according to the invention, there is provided a servo control method of generating a speed command based on the difference between a position command and actual position feedback, generating a current command based on the difference between the speed command and actual speed feedback, and controlling a servomotor based on the current command, wherein an ideal position is calculated based on an ideal servo system model, the difference between the calculated ideal position and the actual position feedback is multiplied by a predetermined gain only for a predetermined time from the direction reversing time of the ideal position, and the result is added to the above-mentioned speed command as the correction amount.
In the servo control method according to the invention, the above-mentioned gain is attenuated in a predetermined time as the maximum value at the direction reversing time of the ideal position.
In the servo control method according to the invention, the difference between the ideal position and the actual position feedback at the direction reversing time of the ideal position is stored as an offset value, the offset value is subtracted from the above-mentioned difference, and the subtraction result is multiplied by the above-mentioned gain.
According to the invention, there is provided a servo control method of generating a speed command based on the difference between a position command and actual position feedback, generating a current command based on the difference between the speed command and actual speed feedback, and controlling a servomotor based on the current command, wherein an ideal position is calculated based on an ideal servo system model, the above-mentioned position feedback or the cumulative position of the ideal servo system model is multiplied by a predetermined gain only for a predetermined time from the direction reversing time of the calculated ideal position, and the result is added to the above-mentioned current command as the correction amount.
In the servo control method according to the invention, the above-mentioned speed feedback or speed of the ideal servo system model is multiplied by a predetermined gain only for a predetermined time from the direction reversing time of the ideal position and the result is added to the above-mentioned current command as the correction amount.
In the servo control method according to the invention, a coefficient proportional to the difference between the ideal position and the actual feedback position is used as the above-mentioned gain.
According to the invention, there is provided a servo control apparatus comprising means for detecting the position and speed of a servomotor, a position control section for generating a speed command based on the difference between a position command and actual position feedback, a speed control section for generating a current command based on the difference between the above-mentioned speed command and actual speed feedback, and a current control section for controlling an electric current allowed to flow into the servomotor based on the above-mentioned current command for controlling the above-mentioned servomotor, and comprising an ideal servo system model, subtraction means for outputting the difference signal between an ideal position calculated by the model and the actual position feedback, and means for multiplying the difference signal output by the subtraction means by a predetermined gain only for a predetermined time from the direction reversing time of the ideal position and adding the result to the above-mentioned speed command as the correction amount.
In the servo control apparatus according to the invention, the above-mentioned gain is attenuated in a predetermined time as the maximum value at the direction reversing time of the ideal position.
The servo control apparatus according to the invention comprises storage means for storing the difference between the ideal position and the actual position feedback at the direction reversing time of the ideal position as an offset value and subtraction means for subtracting the offset value stored in the storage means from the above-mentioned difference, wherein the subtraction result provided by the subtraction means is multiplied by the above-mentioned gain.
According to the invention, there is provided a servo control apparatus comprising means for detecting the position and speed of a servomotor, a position control section for generating a speed command based on the difference between a position command and actual position feedback, a speed control section for generating a current command based on the difference between the above-mentioned speed command and actual speed feedback, and a current control section for controlling an electric current allowed to flow into the servomotor based on the above-mentioned current command for controlling the above-mentioned servomotor, and comprising an ideal servo system model and means for multiplying the above-mentioned position feedback or the cumulative position of the ideal servo system model by a predetermined gain only for a predetermined time from the direction reversing time of the ideal position of the model and adding the result to the above-mentioned current command as the correction amount.
The servo control apparatus according to the invention comprises means for multiplying the above-mentioned speed feedback or speed of the ideal servo system model by a predetermined gain only for a predetermined time from the direction reversing time of the ideal position of the above-mentioned model and adding the result to the above-mentioned current command as the correction amount.
In the servo control apparatus according to the invention, a coefficient proportional to the difference between the ideal position and the actual feedback position is used as the above-mentioned gain.
In the servo control method and its apparatus according to the invention, the above-mentioned ideal servo system model is a model considering a delay of a position loop system from the position command to the position feedback and a mechanical delay of an object to be controlled.